﻿@{
    ViewData["Title"] = "Home Page";
}

<div class="container">
    <div class="row">&nbsp;</div>
    <div class="row">
        <div class="col-6">&nbsp;</div>
        <div class="col-6">
            Message...<input type="text" id="messageInput" />
            <input type="button" id="sendButton" value="Send Message" />
        </div>
    </div>
    <div class="row">
        <div class="col-12">
            <hr />
        </div>
    </div>
    <div class="row">
        <div class="col-6">&nbsp;</div>
        <div class="col-6">
            <ul id="messagesList"></ul>
        </div>
    </div>

    <div>
        <input type="button" id="sendBack" value="后台发送消息" />
    </div>
</div>

<script src="~/lib/signalr/dist/browser/signalr.min.js"></script>
<script src="~/js/messagehub.js"></script>
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script>
    $("#sendBack").click(function () {
        $.post("/Home/Send", {}, function () {

        });
    });
</script>